import org.rsbot.script.methods.Inventory;
import org.rsbot.script.methods.Players;
import org.rsbot.script.wrappers.RSPlayer;

class Fxjewellry$UtilThread
  implements Runnable
{
  private long idleTime = 0L;

  private void sleep(int paramInt) {
    try {
      Thread.sleep(paramInt);
    } catch (Exception localException) {
      localException.printStackTrace();
    }
  }

  public long getIdle() {
    return this.idleTime;
  }

  public void reset(long paramLong) {
    this.idleTime = paramLong;
  }

  public Fxjewellry$UtilThread(Fxjewellry paramFxjewellry) {
    new Thread(this).start();
  }

  public void run() {
    int i = 0;
    while (Fxjewellry.access$300(this.this$0)) {
      sleep(100);
      if (this.this$0.isPaused()) {
        continue;
      }
      if ((i > Fxjewellry.access$700(this.this$0).getCount(new int[] { 2357 })) && (i != 0)) {
        Fxjewellry.access$808(this.this$0);
      }
      i = Fxjewellry.access$900(this.this$0).getCount(new int[] { 2357 });
      if (Fxjewellry.access$1000(this.this$0).getMyPlayer().getAnimation() == -1) {
        this.idleTime += 1L; continue;
      }
      this.idleTime = 0L;
    }
  }
}